#ifndef SYMBOL_INCLUDED
#define SYMBOL_INCLUDED

#include "defines.h"
#include "function_signature.h"
#include "array_signature.h"
 /*
 Un symbole est une variable comme suit :
 un type > void, int, float
 un mode : variable, function ou array
 une structure de definition
   de fonction
   de tableau
 */
struct symbol{
	enum type _type; /*!< */
	char * _name;
	enum mode _mode;
	void * _infos;
};

struct symbol * symbol_create();
void symbol_free(struct symbol * s);
int symbol_set_type(struct symbol * s, enum type);
enum type symbol_get_type(struct symbol *s);

int symbol_set_name(struct symbol * s, char * name);
char * symbol_get_name(struct symbol *s);

int symbol_set_mode(struct symbol * s, enum mode mode);
enum mode symbol_get_mode(struct symbol * s);

int symbol_set_infos(struct symbol * s, void * info);
struct array_signature * symbol_get_array(struct symbol * s);
struct function_signature * symbol_get_function(struct symbol * s);

void symbol_print_type(struct symbol * s);
void symbol_print_name(struct symbol * s);
void symbol_print_def(struct symbol *s);
void symbol_print(struct symbol * s);
#endif
